package masterlink.sarPoint.vo;

import java.io.Serializable;

public class MKLine implements Serializable{
	private static final long serialVersionUID = -3775913377797724277L;
	private int ctime=0;//成交時間
	private int hPrice=0;//最高價
	private int lPrice=99999;//最低價
	private int oPrice=0;//開盤價
	private int cPrice=0;//收盤價
	private int qty=0;//口數
	private long price=0;//價格
	public int getCtime() {
		return ctime;
	}
	public void setCtime(int ctime) {
		this.ctime = ctime;
	}
	public int gethPrice() {
		return hPrice;
	}
	public void sethPrice(int hPrice) {
		if(this.hPrice < hPrice){
			this.hPrice = hPrice;
		}
	}
	public int getlPrice() {
		return lPrice;
	}
	public void setlPrice(int lPrice) {
		if(this.lPrice > lPrice){
			this.lPrice = lPrice;
		}
	}
	public int getoPrice() {
		return oPrice;
	}
	public void setoPrice(int oPrice) {
		if(this.oPrice == 0){
			this.oPrice = oPrice;
		}
	}
	public int getcPrice() {
		return cPrice;
	}
	public void setcPrice(int cPrice) {
		this.cPrice = cPrice;
	}
	public int getQty() {
		return qty;
	}
	public void setQty(int qty) {
		this.qty = this.qty + qty;
	}
	public long getPrice() {
		return price;
	}
	public void setPrice(long price) {
		this.price = this.price + price;
	}
	@Override
	public String toString() {
		return "MKLine [ctime=" + ctime + ", hPrice=" + hPrice + ", lPrice="
				+ lPrice + ", oPrice=" + oPrice + ", cPrice=" + cPrice
				+ ", qty=" + qty + ", price=" + price + "]";
	}

	
}
